export default {
	data() {
		return {
			$message: {}
		}
	},
	created() {
		this.$message = {
			toast: this.toast,
			confirm: this.confirm,
		}
	},
	methods: {
		toast(msg, type,position) {
			this.$refs.page.toast(
				msg,
				type,
				position
			)
		},
		confirm(onconfirm = () => {}, msg = '确定此操作吗？', title = '系统提示') {
			this.$refs.page.confirm(
				onconfirm, msg, title
			)
		},
	}
}
